package com.hzcx.app.simplechat.ui.home.presenter;

import android.content.Context;

import com.hzcx.app.simplechat.api.BaseDialogObserver;
import com.hzcx.app.simplechat.api.BaseObserver;
import com.hzcx.app.simplechat.base.BaseEmptyBean;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.model.HomeModel;
import com.hzcx.app.simplechat.model.MomentModel;
import com.hzcx.app.simplechat.ui.home.bean.AddFriendSearchBean;
import com.hzcx.app.simplechat.ui.home.contract.AddFriendSearchContract;
import com.hzcx.app.simplechat.ui.moment.bean.MomentBean;
import com.hzcx.app.simplechat.ui.moment.contract.UserMomentContract;

import java.util.List;

public class AddFriendSearchPresenter extends BasePresenter<AddFriendSearchContract.View> implements AddFriendSearchContract.Presenter {


    /**
     *  搜索用户
     * @param context
     * @param keyWord
     */
    @Override
    public void searchFriend(Context context, String keyWord) {
        HomeModel.addFriendSearch(context, keyWord, new BaseDialogObserver<AddFriendSearchBean>(context) {
            @Override
            protected void onSuccess(AddFriendSearchBean data) {
                mView.searchResult(data);
            }
        });
    }
}
